<template>
	<view>
		<view class="item-box" @click="goDetails(item)">
			<view class="img-box">
                <image :src=" BASE_URL +item.image" mode="widthFix"></image>
            </view>
			<view class="padding-20 justifyContent-spaceBetween align-items-center">
				<view>
					<view class="item-title fs-28 color-0 fw-b margin-b-10">
						{{item.name}}
					</view>
					<view class="item-content fs-28 color-80 ">
						{{item.content}}
					</view>
				</view>
				<view v-if="isReservation" class="registration-btn color-white fs-24" @click.stop="goReservation">
					立即预约
				</view>
			</view>
		</view>
	</view>
</template>

<script>

import $baseUrl from "@/config/index.js"
const BASE_URL = $baseUrl.baseUrl
	export default {
        props: {
            item: {
                type: Object,
                default: () => {}
            },
			isReservation:{
				type:Boolean,
				default :false
			}
        },
		name:"transform",
		data() {
			return {
                BASE_URL
			};
		},
		methods:{
			goReservation(){},
			goDetails( ){
				uni.navigateTo({
					url:'/pageA/elderlySuitable/transformDetails?id=' + this.item.id
				})
			}
		}
	}
</script>

<style scoped lang="scss">
    .item-box { 
		min-height: 470rpx;
		background: #FFFFFF;
		box-shadow: 0px 0px 14rpx 1px rgba(0,0,0,0.08);
		border-radius: 20rpx;
		overflow: hidden;
		margin-bottom: 18rpx;
       .img-box {
           width: 100%;
       }
    }
	.registration-btn {
		width: 130rpx;
		height: 56rpx;
		background: #43ABC4;
		line-height: 56rpx;
		text-align: center;
		border-radius: 40rpx;
	}
</style>